Update to Python 3.10 and enhance type annotations#482
Update to Python 3.10 and enhance type annotations#482hunterhogan wants to merge 6 commits intobastibe:masterfrom
Conversation
|
Stop spamming. |
|
😞 I sincerely don't know what I did that is spamming. I am following the advice of other people about how to better organize a pull request and about typing. I want to know what mistake I made, so I can improve. I threw out the work I had previously done and started fresh because I wanted to make sure I did everything correctly. That's why it took me three hours of work to make this. mgrinshpon/toolz-stubs#50 (comment) I've been working on typing for soundfile for well over a year: it is in the initial commit of this stupid repo I made for stubs. I didn't about typeshed or how to ... hell, I basically didn't know how to find anything, do anything, or work with other people on anything. resampy was also in the initial commit to my stub repo. It's in typeshed now, despite the mountain of mistakes I made. I'm sorry I spammed you, and I will adjust my actions if you tell me how to improve. |
|
My apologies. Your messages read too much like AI slop, so I assumed the worst. But your response proves that was an error on my part, for which I am very sorry. For what it's worth, I would prefer to iterate on a single pull request instead of starting new ones. Regardless, I've reopened the pull request. The tests still fail, though. |
Do you happen to know the right git syntax to "wipe the slate clean"? I tried to do that in a PR in one of the repos above, and a side effect was to close the original PR. I will decipher the test failures.
thank you. |
882ca92 to
acc90ad
Compare
|
Each pull request is simply a branch on your github. If you force-push a new state to that branch, it will update the pull request accordingly. You can reset to base commit of the branch, which will reset it entirely. |
|
(note that two new pull requests have been merged, which will require a rebase) |
|
I'm 95% sure the newly merged pull requests are in my pull request. On my computer, now the tests pass with 16 warnings. If there is a way for me to initiate the checks on GitHub, I don't know how to do it. Tell me what I should do next. |
Github tests of pull requests are triggered manually by the maintainers. |
| samplerate: Optional[int] = None, channels: Optional[int] = None, | ||
| format: Optional[str] = None, subtype: Optional[str] = None, | ||
| endian: Optional[str] = None, closefd: bool = True) -> Tuple[AudioData, int]: | ||
| @overload |
There was a problem hiding this comment.
Are these overloads really necessary? (Here, and elsewhere in the file)
I find they make the file much harder to read, and as far as I can see, the only thing they specify is the out-type in 1D or 2D. If at all possible, I'd get rid of them
There was a problem hiding this comment.
The difference is between indeterminant and exactly two axes.
An indeterminant-axis return type cannot be assigned to a 2-axis type. Being able to guarantee the shape of the array through typing is extremely useful.
|
Please rebase onto master, where I've removed support for Python <= 3.9. This should make the tests pass. |
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
…eter of the base definition.
Upgrade the codebase to be compatible with Python 3.10 and introduce type aliases and overloads for improved type hinting in methods.